<template>
    <button class="btn" :class="cls" @click="$emit('click', $event)">
        <slot></slot>
    </button>
</template>
<script>
export default {
    props: {
        type: {
            type: String,
            default: 'primary'
        },
        size: {
            type: String,
            default: '',
        }
    },
    computed: {
        cls() {
            return {
                'btn-primary': this.type === 'primary',
                'btn-success': this.type === 'success',
                'btn-danger': this.type === 'danger',
                'btn-info': this.type === 'info',
                'btn-lg': this.size === 'lg',
                'btn-sm': this.size === 'sm',
            }
        }
    }
}

</script>